1. Field of the Invention
The present invention relates to a key input apparatus, and more specifically to a key input apparatus which receives a key input signal including a chattering or bouncing generated in a mechanical key and can generate an effective key input signal when a key is correctly pressed one time.
2. Description of Related Art
At present, keyboards are widely used as input means for computers and word processors, for example. The keyboards include an array of keys which may be captioned buttons or marked areas on a plane. Each of the keys can generate a discrete signal when it is pressed with a finger. In an actual use, however, the key is not only intentionally and correctly pressed with a finger, but also unintentionally, accidently or improperly pressed. Because of this, hitherto, the keyboards have been associated with a key input circuit for generating a key input signal only when the keys are correctly pressed.
Referring to FIG. 1, there is shown one example of a conventional key input apparatus, which comprises a D-type flipflop FF-1 having a D input connected to receive a key signal generated when an individual key is pressed. This flipflop FF-1 includes a clock input receiving a sampling clock and a non-inverted output Q of the flipflop FF-1 is connected to a D input of another flipflop FF-2 whose clock input is also connected to receive the same sampling clock. An inverted output Q of the flipflop FF-1 and a non-inverted output Q of the flipflop FF-2 are connected to a pair of inputs of a NOR circuit NOR-1, which generates an output signal when the key is correctly pressed.
Turning to FIG. 2, there is shown a timing chart illustrating an operation of the key input apparatus shown in FIG. 1. If the key signal is at a high level at a timing t.sub.1 in synchronism with a rising edge of the sampling clock, the key signal is latched by the flipflop FF-1. Thereafter, the non-inverted output of the flipflop FF-1 is latched by the flipflop FF-2 at a timing t.sub.2 in synchronism with a rising edge of the next sampling clock. Thus, the NOR circuit NOR-1, which receives the inverted output of FF-1 and the non-inverted output of FF-2, generates an output pulse signal having a pulse width starting from the timing t.sub.1 and terminating at the timing t.sub.2, as shown in FIG. 2.
As illustrated in FIG. 2, when the key is pressed, chattering or bouncing will often occur at a start and an end of the key signal. Now, if the period of the chattering or bouncing is longer than one period of the sampling clock, there is a possibility that it is treated as being two or more depressions although a single depression was intended. This will cause an error operation in computers or word processors. Therefore, the above mentioned key input apparatus will properly operate only when the chattering of the key is shorter than the period of the sampling clock.